<br />
<a class="portals_icon_link" style="background-image: url('<?php echo $variables['new_image']; ?>');" href="<?php echo url("admin/settings/portal/add"); ?>">Add Portal</a>
<br /><br />
<?php
foreach($variables['data'] as $portal_name => $config) {
?>
<div class="portals_listings_container">
<h2>Portal '<?php echo $portal_name; ?>'</h2>
<a class="portals_icon_link" style="background-image: url('<?php echo $variables['child_image']; ?>');" href="<?php echo url("admin/settings/portal/child/$portal_name"); ?>">Create Child</a>
<a class="portals_icon_link" style="background-image: url('<?php echo $variables['edit_image']; ?>');" href="<?php echo url("admin/settings/portal/edit/$portal_name"); ?>">Edit Portal</a>
<a class="portals_icon_link" style="background-image: url('<?php echo $variables['remove_image']; ?>');" href="<?php echo url("admin/settings/portal/remove/$portal_name/remove"); ?>">Remove Portal</a>
<a class="portals_icon_link" style="background-image: url('<?php echo $variables['settings_image']; ?>');" href="<?php echo url("admin/settings/portal/style/$portal_name"); ?>">Edit Layout Settings</a>
<div class="portals_listings_container_inner">
<?php
  foreach($config as $item){
    if ($item[0] == 'block'){
?>
Block from module <?php echo $item[1][0]; ?> with id <?php echo $item[1][1]; ?>
<br />
<?php
    }
    elseif ($item[0] == 'page') {
?>
Page view with url <?php echo $item[1][0]; ?>
<br />
<?php
    }
  }
?>
</div>
</div>
<?php
}
?>